<?php

include 'appinclude.php';
include 'cache.php';

// establish link with mysql database
$link = @mysql_connect($GLOBALS["db_host"], $GLOBALS["db_user"], $GLOBALS["db_pass"]);
@mysql_select_db($GLOBALS["db_name"]);

$cal_res = mysql_query('SELECT cal_string from cal_strings;');

if(mysql_num_rows($cal_res) != 0)
{
    while ($row = mysql_fetch_array($cal_res))
    {
        $cal_string = stripslashes($row['cal_string']);
        cache_add_cal($cal_string, 'scheduleman');
    }
}

?>